3.5.8 \(\int \frac {a+b \log (c x^n)}{x (d+e x^r)} \, dx\) [408]

Optimal. Leaf size=54 \[ -\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d x^{-r}}{e}\right )}{d r}+\frac {b n \text {Li}_2\left (-\frac {d x^{-r}}{e}\right )}{d r^2} \]

[Out]

-(a+b*ln(c*x^n))*ln(1+d/e/(x^r))/d/r+b*n*polylog(2,-d/e/(x^r))/d/r^2

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2379, 2438} \begin {gather*} \frac {b n \text {PolyLog}\left (2,-\frac {d x^{-r}}{e}\right )}{d r^2}-\frac {\log \left (\frac {d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d r} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(x*(d + e*x^r)),x]

[Out]

-(((a + b*Log[c*x^n])*Log[1 + d/(e*x^r)])/(d*r)) + (b*n*PolyLog[2, -(d/(e*x^r))])/(d*r^2)

Rule 2379

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r_.))), x_Symbol] :> Simp[(-Log[1 +
d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)), x] + Dist[b*n*(p/(d*r)), Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^
(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{x \left (d+e x^r\right )} \, dx &=-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d x^{-r}}{e}\right )}{d r}+\frac {(b n) \int \frac {\log \left (1+\frac {d x^{-r}}{e}\right )}{x} \, dx}{d r}\\ &=-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d x^{-r}}{e}\right )}{d r}+\frac {b n \text {Li}_2\left (-\frac {d x^{-r}}{e}\right )}{d r^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 108, normalized size = 2.00 \begin {gather*} \frac {b n r^2 \log ^2(x)-2 r \left (a+b \log \left (c x^n\right )\right ) \log \left (d-d x^r\right )+2 b n r \log (x) \left (\log \left (d-d x^r\right )-\log \left (d+e x^r\right )\right )+2 b n \log \left (-\frac {e x^r}{d}\right ) \log \left (d+e x^r\right )+2 b n \text {Li}_2\left (1+\frac {e x^r}{d}\right )}{2 d r^2} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*Log[c*x^n])/(x*(d + e*x^r)),x]

[Out]

(b*n*r^2*Log[x]^2 - 2*r*(a + b*Log[c*x^n])*Log[d - d*x^r] + 2*b*n*r*Log[x]*(Log[d - d*x^r] - Log[d + e*x^r]) +
 2*b*n*Log[-((e*x^r)/d)]*Log[d + e*x^r] + 2*b*n*PolyLog[2, 1 + (e*x^r)/d])/(2*d*r^2)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.15, size = 451, normalized size = 8.35

method result size
risch \(\frac {b \ln \left (d +e \,x^{r}\right ) n \ln \left (x \right )}{r d}-\frac {b \ln \left (d +e \,x^{r}\right ) \ln \left (x^{n}\right )}{r d}-\frac {b \ln \left (x^{r}\right ) n \ln \left (x \right )}{r d}+\frac {b \ln \left (x^{r}\right ) \ln \left (x^{n}\right )}{r d}+\frac {b n \ln \left (x \right )^{2}}{2 d}-\frac {b n \ln \left (x \right ) \ln \left (1+\frac {e \,x^{r}}{d}\right )}{r d}-\frac {b n \polylog \left (2, -\frac {e \,x^{r}}{d}\right )}{r^{2} d}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (x^{r}\right )}{2 r d}-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (x^{r}\right )}{2 r d}+\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (d +e \,x^{r}\right )}{2 r d}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d +e \,x^{r}\right )}{2 r d}-\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d +e \,x^{r}\right )}{2 r d}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (x^{r}\right )}{2 r d}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (d +e \,x^{r}\right )}{2 r d}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (x^{r}\right )}{2 r d}-\frac {b \ln \left (c \right ) \ln \left (d +e \,x^{r}\right )}{r d}+\frac {b \ln \left (c \right ) \ln \left (x^{r}\right )}{r d}-\frac {a \ln \left (d +e \,x^{r}\right )}{r d}+\frac {a \ln \left (x^{r}\right )}{r d}\) \(451\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/x/(d+e*x^r),x,method=_RETURNVERBOSE)

[Out]

b/r/d*ln(d+e*x^r)*n*ln(x)-b/r/d*ln(d+e*x^r)*ln(x^n)-b/r/d*ln(x^r)*n*ln(x)+b/r/d*ln(x^r)*ln(x^n)+1/2*b*n/d*ln(x
)^2-b/r*n/d*ln(x)*ln(1+e*x^r/d)-b/r^2*n/d*polylog(2,-e*x^r/d)+1/2*I/r*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2/d*ln(x^
r)-1/2*I/r*b*Pi*csgn(I*c*x^n)^3/d*ln(x^r)+1/2*I/r*b*Pi*csgn(I*c*x^n)^3/d*ln(d+e*x^r)-1/2*I/r*b*Pi*csgn(I*c)*cs
gn(I*c*x^n)^2/d*ln(d+e*x^r)-1/2*I/r*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2/d*ln(d+e*x^r)+1/2*I/r*b*Pi*csgn(I*c)*csgn
(I*c*x^n)^2/d*ln(x^r)+1/2*I/r*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)/d*ln(d+e*x^r)-1/2*I/r*b*Pi*csgn(I*c)*cs
gn(I*x^n)*csgn(I*c*x^n)/d*ln(x^r)-1/r*b*ln(c)/d*ln(d+e*x^r)+1/r*b*ln(c)/d*ln(x^r)-a/r/d*ln(d+e*x^r)+a/r/d*ln(x
^r)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*x^r),x, algorithm="maxima")

[Out]

a*(log(x)/d - log((e*x^r + d)/e)/(d*r)) + b*integrate((log(c) + log(x^n))/(e*x*x^r + d*x), x)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 96, normalized size = 1.78 \begin {gather*} \frac {b n r^{2} \log \left (x\right )^{2} - 2 \, b n r \log \left (x\right ) \log \left (\frac {x^{r} e + d}{d}\right ) - 2 \, b n {\rm Li}_2\left (-\frac {x^{r} e + d}{d} + 1\right ) - 2 \, {\left (b r \log \left (c\right ) + a r\right )} \log \left (x^{r} e + d\right ) + 2 \, {\left (b r^{2} \log \left (c\right ) + a r^{2}\right )} \log \left (x\right )}{2 \, d r^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*x^r),x, algorithm="fricas")

[Out]

1/2*(b*n*r^2*log(x)^2 - 2*b*n*r*log(x)*log((x^r*e + d)/d) - 2*b*n*dilog(-(x^r*e + d)/d + 1) - 2*(b*r*log(c) +
a*r)*log(x^r*e + d) + 2*(b*r^2*log(c) + a*r^2)*log(x))/(d*r^2)

________________________________________________________________________________________

Sympy [A]
time = 194.90, size = 452, normalized size = 8.37 \begin {gather*} - \frac {2 a e \left (\begin {cases} \frac {1}{2 e} + \frac {x^{r}}{d} & \text {for}\: e = 0 \\- \frac {\log {\left (- 2 e x^{r} \right )}}{2 e} & \text {otherwise} \end {cases}\right )}{d r} - \frac {2 a e \left (\begin {cases} \frac {1}{2 e} + \frac {x^{r}}{d} & \text {for}\: e = 0 \\\frac {\log {\left (2 d + 2 e x^{r} \right )}}{2 e} & \text {otherwise} \end {cases}\right )}{d r} + \frac {2 b e n \left (\begin {cases} \begin {cases} \frac {\log {\left (x \right )}}{2 e} + \frac {x^{r}}{d r} & \text {for}\: r \neq 0 \\\frac {\log {\left (x \right )}}{2 e} + \frac {\log {\left (x \right )}}{d} & \text {otherwise} \end {cases} & \text {for}\: e = 0 \\- \frac {\begin {cases} 0 & \text {for}\: \frac {1}{\left |{e x^{r}}\right |} < 1 \wedge \left |{e x^{r}}\right | < 1 \\\frac {\log {\left (e x^{r} \right )}^{2}}{2 r} + \frac {i \pi \log {\left (e x^{r} \right )}}{r} & \text {for}\: \left |{e x^{r}}\right | < 1 \\\frac {\log {\left (\frac {x^{- r}}{e} \right )}^{2}}{2 r} - \frac {i \pi \log {\left (\frac {x^{- r}}{e} \right )}}{r} & \text {for}\: \frac {1}{\left |{e x^{r}}\right |} < 1 \\\frac {{G_{3, 3}^{3, 0}\left (\begin {matrix} & 1, 1, 1 \\0, 0, 0 & \end {matrix} \middle | {e x^{r} e^{i \pi }} \right )}}{r} + \frac {{G_{3, 3}^{0, 3}\left (\begin {matrix} 1, 1, 1 & \\ & 0, 0, 0 \end {matrix} \middle | {e x^{r} e^{i \pi }} \right )}}{r} & \text {otherwise} \end {cases}}{2 e} - \frac {\log {\left (2 \right )} \log {\left (x \right )}}{2 e} & \text {otherwise} \end {cases}\right )}{d r} + \frac {2 b e n \left (\begin {cases} \begin {cases} \frac {\log {\left (x \right )}}{2 e} + \frac {x^{r}}{d r} & \text {for}\: r \neq 0 \\\frac {\log {\left (x \right )}}{2 e} + \frac {\log {\left (x \right )}}{d} & \text {otherwise} \end {cases} & \text {for}\: e = 0 \\\frac {\begin {cases} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \wedge \left |{x}\right | < 1 \\\log {\left (d \right )} \log {\left (x \right )} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {for}\: \left |{x}\right | < 1 \\- \log {\left (d \right )} \log {\left (\frac {1}{x} \right )} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \\- {G_{2, 2}^{2, 0}\left (\begin {matrix} & 1, 1 \\0, 0 & \end {matrix} \middle | {x} \right )} \log {\left (d \right )} + {G_{2, 2}^{0, 2}\left (\begin {matrix} 1, 1 & \\ & 0, 0 \end {matrix} \middle | {x} \right )} \log {\left (d \right )} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {otherwise} \end {cases}}{2 e} + \frac {\log {\left (2 \right )} \log {\left (x \right )}}{2 e} & \text {otherwise} \end {cases}\right )}{d r} - \frac {2 b e \left (\begin {cases} \frac {1}{2 e} + \frac {x^{r}}{d} & \text {for}\: e = 0 \\- \frac {\log {\left (- 2 e x^{r} \right )}}{2 e} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )}}{d r} - \frac {2 b e \left (\begin {cases} \frac {1}{2 e} + \frac {x^{r}}{d} & \text {for}\: e = 0 \\\frac {\log {\left (2 d + 2 e x^{r} \right )}}{2 e} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )}}{d r} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/x/(d+e*x**r),x)

[Out]

-2*a*e*Piecewise((1/(2*e) + x**r/d, Eq(e, 0)), (-log(-2*e*x**r)/(2*e), True))/(d*r) - 2*a*e*Piecewise((1/(2*e)
 + x**r/d, Eq(e, 0)), (log(2*d + 2*e*x**r)/(2*e), True))/(d*r) + 2*b*e*n*Piecewise((Piecewise((log(x)/(2*e) +
x**r/(d*r), Ne(r, 0)), (log(x)/(2*e) + log(x)/d, True)), Eq(e, 0)), (-Piecewise((0, (Abs(e*x**r) < 1) & (1/Abs
(e*x**r) < 1)), (log(e*x**r)**2/(2*r) + I*pi*log(e*x**r)/r, Abs(e*x**r) < 1), (log(1/(e*x**r))**2/(2*r) - I*pi
*log(1/(e*x**r))/r, 1/Abs(e*x**r) < 1), (meijerg(((), (1, 1, 1)), ((0, 0, 0), ()), e*x**r*exp_polar(I*pi))/r +
 meijerg(((1, 1, 1), ()), ((), (0, 0, 0)), e*x**r*exp_polar(I*pi))/r, True))/(2*e) - log(2)*log(x)/(2*e), True
))/(d*r) + 2*b*e*n*Piecewise((Piecewise((log(x)/(2*e) + x**r/(d*r), Ne(r, 0)), (log(x)/(2*e) + log(x)/d, True)
), Eq(e, 0)), (Piecewise((-polylog(2, e*x**r*exp_polar(I*pi)/d)/r, (Abs(x) < 1) & (1/Abs(x) < 1)), (log(d)*log
(x) - polylog(2, e*x**r*exp_polar(I*pi)/d)/r, Abs(x) < 1), (-log(d)*log(1/x) - polylog(2, e*x**r*exp_polar(I*p
i)/d)/r, 1/Abs(x) < 1), (-meijerg(((), (1, 1)), ((0, 0), ()), x)*log(d) + meijerg(((1, 1), ()), ((), (0, 0)),
x)*log(d) - polylog(2, e*x**r*exp_polar(I*pi)/d)/r, True))/(2*e) + log(2)*log(x)/(2*e), True))/(d*r) - 2*b*e*P
iecewise((1/(2*e) + x**r/d, Eq(e, 0)), (-log(-2*e*x**r)/(2*e), True))*log(c*x**n)/(d*r) - 2*b*e*Piecewise((1/(
2*e) + x**r/d, Eq(e, 0)), (log(2*d + 2*e*x**r)/(2*e), True))*log(c*x**n)/(d*r)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*x^r),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)/((x^r*e + d)*x), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {a+b\,\ln \left (c\,x^n\right )}{x\,\left (d+e\,x^r\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))/(x*(d + e*x^r)),x)

[Out]

int((a + b*log(c*x^n))/(x*(d + e*x^r)), x)

________________________________________________________________________________________